<?php

declare(strict_types=1);

namespace App\CustHub\Mapper;

use App\CustHub\Model\ChRoomBroadcast;
use Hyperf\Database\Model\Model;
use Mine\Abstracts\AbstractMapper;

class ChRoomBroadcastMapper extends AbstractMapper
{
    public function assignModel()
    {
        $this->model = ChRoomBroadcast::class;
    }

    public function findById(mixed $id): ChRoomBroadcast|Model|string|\Hyperf\Database\Model\Builder|null
    {
        $info = $this->model::query()
            ->where('id',$id)
            ->first();
        return $info;
    }
}